import { ApiCall } from "tsrpc";
import { ReqLook, ResLook } from "../../../shared/master/team/PtlLook";
import { player } from "../../../model/fight/body/player";
import { team } from "../../model/lib/team";
import { Tpl_teamInfo, template } from "../../../shared/master/MsgAction";

export default async function (call: ApiCall<ReqLook, ResLook>) {
    call.succ({})
    let user = call.req._player as player;
    let _team = user.get_team() as team;
    let tpl:Tpl_teamInfo = {
        name: _team.name,
        desc: _team.desc,
        leve: _team.leve,
        member_cont: _team._memberMap.size,
        online_cont: _team.get_onlineCont(),
        team_job: 0,
        contribute: _team.get_contribute(user.uuid),
        nextTime: 0
    }
    user.sendMsg(template.小队信息,tpl)
}